<div id="forum-header-bar">
    <ul>
        <?php if($is_user_login){ ?>
        <li id="ucp-icon"><a href="<?php echo $ucp_link; ?>"><?php echo $text_ucp; ?></a></li>
        <li>(<a href="<?php echo $new_message_link; ?>"><?php echo $text_new_message; ?></a>)</li>
        <li><a id="daily-bonus" href="javascript:void(0);"><?php echo $text_claim_daily_bonus; ?></a></li>
        <li id="quick-nav">
            <a class="quick-nav-button" id="quick-nav-button" href="javascript:void(0);"  onmouseover="rolloverMenu(1, 'quick-nav-menu', 'quick-nav-button');" onmouseout="rolloverMenu(0, 'quick-nav-menu', 'quick-nav-button');"><?php echo $text_quick_nav; ?></a>
            <div id="quick-nav-menu" onmouseover="rolloverMenu(1, 'quick-nav-menu', 'quick-nav-button');" onmouseout="rolloverMenu(0, 'quick-nav-menu', 'quick-nav-button');">
                <a href="<?php echo $topics_link; ?>"><?php echo $text_view_your_topics; ?></a>
                <a href="<?php echo $posts_link; ?>"><?php echo $text_view_your_posts; ?></a>
                <a href="<?php echo $unanswered_topics_link; ?>"><?php echo $text_unanswered__topics; ?></a>
            </div>
        </li>
        <?php } ?>
        <li id="forum-header-bar-search">
            <input name="header-keyword" id="header-keyword" type="text" maxlength="128" title="<?php echo $text_search_button_title; ?>" value="<?php echo $text_search_forum; ?>" onclick="if(this.value=='<?php echo $text_search_forum; ?>')this.value='';" onblur="if(this.value=='')this.value='<?php echo $text_search_forum; ?>';" />
            <input type="button" id="header-search-button" value="<?php echo $text_search_submit_button_value; ?>" />
            <a href="<?php echo $search_link; ?>" title="<?php echo $text_advanced_search_button_title; ?>"><?php echo $text_advanced_search; ?></a>
        </li>
    </ul>
</div>
<script type="text/javascript"><!--
var submit=false;

$('#daily-bonus').bind('click', function() {
    if(submit){
        return false;
    }

    $.ajax({
        url: 'index.php?route=community/community_header/bonus',
        type:'GET',
        dataType: 'json',
        success: function(json) {
            if (json['error']) {
                $('#forum-header-bar').after('<div class="warning">' + json['error'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
            }

            if (json['success']) {

                $('#forum-header-bar').after('<div class="success">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');

                $('html, body').animate({ scrollTop: 0 }, 'slow');
            }
        }
    });

    submit=true;
});
//--></script>